package com.wing.cabinet.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wing.cabinet.model.entity.StorageInventoryInoutDetail;
import com.wing.cabinet.model.response.ScrapApplyVO;
import com.wing.cabinet.model.response.StorageInventoryInoutDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 暂存柜存刀/取刀;存/取维修/回收刀明细-Dao
 *
 * @author
 */
@Mapper
public interface StorageInventoryInoutDetailDao extends BaseMapper<StorageInventoryInoutDetail> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<StorageInventoryInoutDetailVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<StorageInventoryInoutDetailVO> list4app(@Param("page") Page<StorageInventoryInoutDetailVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    StorageInventoryInoutDetailVO get4appById(Long id);

    int update4Check(@Param("businessTypeChecked") Integer businessTypeChecked,@Param("inoutId") Long inoutId);

    int update4Sign(@Param("repairPrice")BigDecimal repairPrice, @Param("quantitySign") Integer quantitySign, @Param("inoutId") Long inoutId);

    /**
     * 我的待办任务列表 -app
     */
    List<StorageInventoryInoutDetailVO> toDoTask(@Param("page") Page<StorageInventoryInoutDetailVO> page);



    /**
     * 我的待办任务产品查询 -app
     */
    List<ScrapApplyVO> selTaskPro(@Param("id") String id);

    /**
     * 盘验任务列表  所有柜子信息 -app
     */
    List<ScrapApplyVO>diskTask(@Param("page") Page<StorageInventoryInoutDetailVO> page);

    /**
     * 盘验 根据柜子编号查询当前柜子的信息 -app
     * @param cabCode
     * @return
     */
    ScrapApplyVO getCabinet(@Param("cabCode")String cabCode);

    /**
     * 盘验 柜子下库位的信息 -app
     */
    List<ScrapApplyVO> diskStorage(@Param("params") Map<String, Object> params,@Param("page")Page<ScrapApplyVO>page);

    /**
     * 盘验结果 异常
     * @param page
     * @return
     */
    List<ScrapApplyVO> diskResult(@Param("page")Page<ScrapApplyVO>page,@Param("params")Map<String,Object>params);

    /**
     * 盘验结果 正常
     * @param page
     * @return
     */
    List<ScrapApplyVO> diskResultNormal(@Param("page")Page<ScrapApplyVO>page,@Param("params")Map<String,Object>params);

    /**
     * 维修订单
     */
    List<ScrapApplyVO>repairOrder();

}
